package kr.hkit.team.score.service;

import java.sql.SQLException;

import javax.swing.JOptionPane;

import kr.hkit.team.score.dao.ScoreDAO;
import kr.hkit.team.score.dto.Score;

public class ScoreService {

	private ScoreDAO dao;
	
	

	public ScoreService(ScoreDAO dao) {
		this.dao = dao;
	}
	
	public void insertData(Score sc) {
		JOptionPane.showMessageDialog(null, sc);

		try {
			dao.insertItems(sc);
			JOptionPane.showMessageDialog(null, "입력되었습니다.");
		} catch (SQLException e1) {
			JOptionPane.showMessageDialog(null, "입력실패 다시 확인하세요.");
		}
	}

}
